package com.bluesea.report.entity;

import java.io.Serializable;

/**
 * 
* @ClassName: Menu 菜单实体类
* @Description: TODO(用于前端导航菜单列表展示) 
* @author 何岩骏 
* @date 2017年9月7日 下午4:01:44
 */
public class Menu implements Serializable {

	/** 
	* @Fields serialVersionUID : TODO(序列号) 
	*/ 
	private static final long serialVersionUID = -7827042600167007900L;
	
	private Integer id;//主键
	private Integer bpid;//面包屑导航的父id
	private Integer mpid;//菜单的父id，缺省时为一级菜单，为-1时在菜单中不显示
	private String name;//菜单目录名称
	private String route;//匹配路由,缺省时不做跳转
	private String icon;//在名称前显示的图标
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public Integer getBpid() {
		return bpid;
	}
	public void setBpid(Integer bpid) {
		this.bpid = bpid;
	}
	public Integer getMpid() {
		return mpid;
	}
	public void setMpid(Integer mpid) {
		this.mpid = mpid;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getRoute() {
		return route;
	}
	public void setRoute(String route) {
		this.route = route;
	}
	public String getIcon() {
		return icon;
	}
	public void setIcon(String icon) {
		this.icon = icon;
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Menu other = (Menu) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		return true;
	}
	
	@Override
	public String toString() {
		return "Menu [id=" + id + ", bpid=" + bpid + ", mpid=" + mpid + ", name=" + name + ", route=" + route
				+ ", icon=" + icon + "]";
	}
	
	public Menu(Integer id, Integer bpid, Integer mpid, String name, String route, String icon) {
		super();
		this.id = id;
		this.bpid = bpid;
		this.mpid = mpid;
		this.name = name;
		this.route = route;
		this.icon = icon;
	}
	
	public Menu() {
		super();
	}
}
